<?php /* $Id: install.php $ */
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either version 2
//of the License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
?>
<!--
<font color="red"><strong>You have installed the Dialplan Injection Module!<BR>
	</strong></font><BR>
-->
<?php
dialplaninjection_updatedb();

//bring db up to date on install/upgrade
function dialplaninjection_updatedb() {
	global $db;
	$sql = "ALTER IGNORE TABLE `dialplaninjection_dialplaninjections` CHANGE `exten` `exten` VARCHAR( 100 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;";
	$db->query($sql);
//
	global $db;
	$sql = "ALTER IGNORE TABLE `dialplaninjection_dialplaninjections` DROP INDEX `exten`;";
	$db->query($sql);
	$sql = "ALTER IGNORE TABLE `dialplaninjection_commands_list` ADD `info` VARCHAR(255) NULL , ADD `url` VARCHAR(255) NULL;";
	$db->query($sql);
	$sql = "ALTER IGNORE TABLE `dialplaninjection_commands_list` ADD UNIQUE (`description`)";
	$db->query($sql);
//remove this one after one version
	$sql = "TRUNCATE TABLE `dialplaninjection_commands_list`;";
	$db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('AbsoluteTimeout', 'AbsoluteTimeout(seconds)','Set absolute maximum time of call','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+AbsoluteTimeout');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('AddQueueMember','AddQueueMember(queuename[|interface][|penalty])','Dynamically adds queue members','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+AddQueueMember');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ADSIProg','ADSIProg(script)','Load Asterisk ADSI Scripts into phone','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ADSIProg');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('AgentCallbackLogin','AgentCallbackLogin([AgentNo|][Options|][exten]@context)','Call agent callback login','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+AgentCallbackLogin');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('AgentLogin','AgentLogin(AgentNo[|options])','Call agent login','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+AgentLogin');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('AgentMonitorOutgoing','AgentMonitorOutgoing(options)','Record agent''s outgoing call','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+AgentMonitorOutgoing');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('AGI','AGI(command|args)','Executes an AGI compliant application','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+AGI');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('AlarmReceiver','AlarmReceiver','Emulate an Ademco Contact ID Alarm Receiver','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+AlarmReceiver');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ALSAMonitor','ALSAMonitor(password)','Monitor the ALSA console','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ALSAMonitor');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Answer','Answer([delay])','Answer a channel if ringing','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Answer');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('AppendCDRUserField','AppendCDRUserField(Value)','Append data to CDR User field','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+AppendCDRUserField');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Authenticate','Authenticate(password[|options]])','Authenticate a user','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Authenticate');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Background','Background(filename1[&filename2...][|options[|langoverride][|context]])','Play a sound file while executing other commands','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+BackGround');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('BackgroundDetect','BackgroundDetect(filename[|sil[|min|max)','Background a file with talk detect','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+BackGroundDetect');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Busy','Busy()','Indicate busy condition and wait for hangup','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Busy');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('CALLERID (Set)','Set(CALLERID(all)=John Doe<8883211234>)','Set CallerID.','');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('CALLERID (SetName)','Set(CALLERID(name)=John Doe)','Set CallerID Name.','');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('CALLERID (SetNum)','Set(CALLERID(number)=8883211234)','Set only the Caller ID number (not name).','');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ChangeMonitor','ChangeMonitor(basename)','Change monitoring filename of a channel','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ChangeMonitor');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ChanIsAvail','ChanIsAvail (Technology/resource[&Technology2/resource2...][|options])','Check if channel is available','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ChanIsAvail');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ChanSpy','Chanspy([<scanspec>][|<options>])','Universal channel barge-in','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ChanSpy');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Congestion','Congestion()','Indicate congestion and wait for hangup','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Congestion');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ControlPlayback','ControlPlayback(filename,skip,forward,rewind,stop,pause,restart)','Play a sound file with fast forward, rewind and exit controls','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ControlPlayback');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('CURL','CURL(url[|post-data])','Allows for the retrieval of external URLs. Also supports POSTing.','');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('DB (Set)','Set(DB(family/key)=\${foo})','Store a value in the database.','');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('DB (Get)','Set(foo=\${DB(family/key)})','Retrieve a value from the database.','');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('DBdel','DBdel(family/key)','Delete a key from the database.','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+DBdel');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('DBdeltree','DBdeltree(family/keytree)','Delete a family or keytree from the database.','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+DBdeltree');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('DeadAGI','DeadAGI(command|args)','Executes AGI on a hung-up channel','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+DeadAGI');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Dial','Dial(type/identifier,timeout,options,URL)','Place a call and connect to the current channel','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Dial');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Dictate','Dictate([path])','Records and plays back a dictation','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Dictate');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Directory','Directory(vm-context[|dial-context[|options]])','Provide directory of voicemail extensions','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Directory');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('DISA','DISA(passcode[|context])','DISA (Direct Inward System Access)','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+DISA');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('DUNDILOOKUP','DUNDILOOKUP(number[|context[|options]])','Look up a number with DUNDi','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+DISA');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('EAGI','EAGI(command|args)','Executes an AGI compliant application','');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Echo','Echo()','Echo audio read back to the user','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Echo');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('EndWhile','EndWhile()','End A While Loop - *1.2beta','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+EndWhile');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('EnumLookup','ENUMLOOKUP(number[,Method-type[,options|record#[,zone-suffix]]])','Lookup number in ENUM','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+EnumLookup');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ExecIf','ExecIF(<expr>|<app>|<data>)','Conditional exec - *1.2beta','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ExecIf');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Festival','Festival(text,intkeys)','Say text with the Festival voice synthesizer','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Festival');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Flash','Flash()','Flashes a Zap Trunk','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Flash');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Flite','Flite(text,intkeys)','Say text with the Festival Lite voice synthesizer (faster response than Festival)','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Festival');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ForkCDR','ForkCDR()','Fork The CDR into 2 seperate entities','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ForkCDR');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Gosub','Gosub([[context|]extension|]priority)','Jump to a subroutine and return (new in v1.2)','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Gosub');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('GosubIf','GosubIf(condition?label1:label2)','Conditional jump to a subroutine and return (new in v1.2)','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+GosubIf');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Goto','Goto([[context|]extension|]priority)','Goto a particular priority, extension, or context','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Goto');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('GotoIf','GotoIf(condition?label1[:label2])','Conditional goto','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+GotoIf');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('GotoIfTime','GotoIfTime(<time range>|<days of week>|<days of month>|<months>?[[context|]extension|]pri)','Conditional goto on current time','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+GotoIfTime');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Hangup','Hangup()','Unconditional hangup','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Hangup');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('HasNewVoicemail','HasNewVoicemail(vmbox[@context][:folder][|varname])','Conditionally branches to priority + 101','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+HasNewVoicemail');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ImportVar','ImportVar(newvar=channelname|variable)','Set variable to value','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ImportVar');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('LookupBlacklist','LookupBlacklist','Look up Caller*ID name/number from blacklist database','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+LookupBlacklist');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('LookupCIDName','LookupCIDName','Look up CallerID Name from local database','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+LookupCIDName');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Macro','Macro(macroname,arg1,arg2...)','Macro Implementation','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Macro');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MailboxExists','MailboxExists(mailbox[@context])','Checks if mailbox exists','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+MailboxExists');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MATH','MATH(<number1><op><number 2>[,<type_of_result>])','Perform (rather simple) calculations.','');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MeetMe','MeetMe([confno][,[options][,pin]])','Simple MeetMe conference bridge','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+MeetMe');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MeetMeAdmin','MeetMeAdmin(confno,command[,user])','MeetMe conference Administration','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+MeetMeAdmin');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MeetMeCount','MeetMeCount(confno[|var])','MeetMe participant count','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+MeetMeCount');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Milliwatt','Milliwatt()','Generate a Constant 1000Hz tone at 0dbm (mu-law)','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Milliwatt');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MixMonitor','MixMonitor(<file>.<ext>[|<options>[|<command>]])','Record and mix call legs natively (unlike Monitor) v1.2.x','http://www.voip-info.org/wiki/view/MixMonitor');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Monitor','Monitor(ext,basename,flags)','Record a telephone conversation to a sound file','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Monitor');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MP3Player','MP3Player(location)','Play an MP3 sound file or stream','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+MP3Player');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MusicOnHold','MusicOnHold(class)','Play Music On Hold indefinitely','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+MusicOnHold');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MYSQL_Connect','MYSQL(Connect connid dhhost dbuser dbpass dbname)','Perform various mySQL database activities','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+MYSQL');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MYSQL_Query','MYSQL(Query resultid \${connid} query-string)','Perform various mySQL database activities','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+MYSQL');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MYSQL_Fetch','MYSQL(Fetch fetchid \${resultid} var1 var2 ... varN)','Perform various mySQL database activities','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+MYSQL');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MYSQL_Clear','MYSQL(Clear \${resultid})','Perform various mySQL database activities','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+MYSQL');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('MYSQL_Disconnect','MYSQL(Disconnect \${connid})','Perform various mySQL database activities','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+MYSQL');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('NoCDR','NoCDR()','Make sure asterisk doesn''t save CDR for a certain call','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+NoCDR');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('NoOp','NoOp()','No operation. Can print values to console for debugging.','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+NoOp');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Page','Page(Technology/Resource&Tech2/Res2...[|options])','Page a mobile device (new in Asterisk v1.2)','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Page');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ParkAndAnnounce','ParkAndAnnounce(announce:template|timeout|dial|return_context)','Park and Announce','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ParkAndAnnounce');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ParkedCall','ParkedCall(exten)','Answer a parked call','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ParkedCall');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('PauseQueueMemeber','PauseQueueMember(queuename|agent)','Pauses an agent','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+PauseQueueMember');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Playback','Playback(filename,options...)','Play a sound file','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Playback');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Playtones','Playtones(tonename)','Play a tone list while executing other commands','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Playtones');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('PrivacyManager','PrivacyManager','Require phone number to be entered, if no CallerID sent','');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Progress','Progress()','Play early audio to the caller before answering the line','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Progress');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Queue','Queue(queuename|options|optionalurl|announceoverride|timeout)','Queue a call for a call queue','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Queue');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Random','Random(probability:label)','Make a random jump in your dial plan','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Random');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Read','Read(variable[|filename][|maxdigits][|option][|attempts][|timeout])','Read a variable with DTMF','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Read');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Record','Record(filename.format[|silence][|maxduration][|option])','Record user voice input to a file','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Record');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('RemoveQueueMember','RemoveQueueMember(queuename[|interface])','Dynamically removes queue members','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+RemoveQueueMember');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ResetCDR','ResetCDR([options])','Reset CDR data','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ResetCDR');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ResponseTimeout','ResponseTimeout(seconds)','Set maximum timeout awaiting response','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ResponseTimeout');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('RetryDial','RetryDial(announce|sleep|loops|Technology/resource[&Technology2/resource2...[|timeout[|options[|URL]]]])','Place a call, retrying on failure allowing optional exit extension.','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+RetryDial');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Return','Return()','Return from a Gosub or GosubIf (new in v1.2)','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Return');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Ringing','Ringing()','Indicate ringing','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Ringing');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SayAlpha','SayAlpha(string)','Say Alpha','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SayAlpha');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SayDigits','SayDigits(digits)','Say Digits','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SayDigits');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SayNumber','SayNumber(number, gender)','Say Number','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SayNumber');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SayPhonetic','SayPhonetic(text)','Say Phonetic','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SayPhonetic');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SayUnixTime','SayUnixTime(unixtime,timezone,format)','Say the date and/or time','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SayUnixTime');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SendDTMF','SendDTMF(digits[|timeout_ms])','Sends arbitrary DTMF digits','');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SendText','SendText(text)','Send client a text message','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SendText');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SendURL','SendURL(URL[|option])','Send a client a URL to display','');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Set','Set(variablename=value[|variable2=value2][|options])','Set channel variable(s) or function value(s)','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Set');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SetAccount','Set(CDR(accountcode)=account)','Sets account code','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SetAccount');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SetAMAflags','SetAMAFlags(flags)','Set the channel AMA Flags for billing','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SetAMAflags');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SetCallerPres','SetCallerPres(presentation)','Channel independent setting of caller presenation','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SetCallerPres');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SetCDRUserField','Set(CDR(userfield)=Value)','Set CDR User field','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SetCDRUserField');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SetMusicOnHold','SetMusicOnHold(class)','Set default Music On Hold class','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SetMusicOnHold');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SIPAddHeader','SIPaddheader()','Add header to outbound SIP invite','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SIPAddHeader');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SIPdtmfMode','SIPDtmfMode(inband|info|rfc2833)','Change DTMF mode during SIP call','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SIPdtmfmode');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('SoftHangup','SoftHangup(Technology/resource[|a])','Request hangup on another channel','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SoftHangup');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('StackPop','StackPop()','Remove a return address without returning (new in v1.2)','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+StackPop');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('StopMonitor','StopMonitor','Stop monitoring a channel','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+StopMonitor');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('StopPlaytones','StopPlaytones','Stop playing a tone list','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+StopPlaytones');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('System','System(command)','Execute a system command','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+System');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Transfer','Transfer([Tech/]dest[|options])','Transfer caller to remote extension','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Transfer');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('TrySystem','TrySystem(command)','Execute a system command with always 0 returned','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+TrySystem');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('TXTCIDName','Set(foo=\${TXTCIDNAME(<number>)})','Lookup caller name from TXT record','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+TXTCIDName');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('UnpauseQueueMemeber','UnPauseQueueMember(queuename|agent)','Resumes an agent','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+UnpauseQueueMember');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('UserEvent','UserEvent(eventname[|body])','Send an arbitrary event to the manager interface','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+UserEvent');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('VMAuthenticate','VMAuthenticate([mailbox][@context][|options])','Authenticate a user based on voicemail.conf','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+VMAuthenticate');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('VoiceMail','VoiceMail([flags]boxnumber[@context][&boxnumber2[@context]][&boxnumber3])','Leave a voicemail message','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+VoiceMail');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('VoiceMailMain','VoiceMailMain([[s]mailbox]@context)','Enter voicemail system','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+VoiceMailMain');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Wait','Wait(seconds)','Waits for some time','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Wait');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('WaitExten','WaitExten(seconds)','Waits for some time','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+WaitExten');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('WaitForRing','WaitForRing(timeout)','Wait for Ring Application','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+WaitForRing');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('WaitMusicOnHold','WaitMusicOnHold(delay)','Wait, playing Music On Hold','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+WaitMusicOnHold');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('While','While(condition)','Start A While Loop - *1.2beta','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+While');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('Zapateller','Zapateller(options)','Block telemarketers with SIT','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Zapateller');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ZapBarge','ZapBarge(channel)','Barge in (monitor) Zap channel','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ZapBarge');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ZapScan','ZapScan','Scan Zap channels to monitor calls','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ZapScan');";  $db->query($sql);
$sql = "INSERT IGNORE INTO `dialplaninjection_commands_list` (description, command, info, url) VALUES ('ZapSendKeypadFacility','ZapSendKeypadFacility(digits)','Send digits out of band over a PRI','http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+ZapSendKeypadFacility');";  $db->query($sql);
	$sql = "update `dialplaninjection_module` set `value` = '0.1.1' where `id` = 'moduleversion';";
	$db->query($sql);
}


?>


